function r2 = lpcvd_h2r2(h)
L = size(h,1);
h_mean = mean(mean(h));
r2 = sum(sum((h-h_mean).^2))/L^2;